<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<div class="lefter">
    <!-- 商品分类信息栏 -->
    <div class="box">
        <h2>商品分类</h2>
        <dl>
            <c:forEach items="${bigTypes}" var="bigType" >
                <c:if test="${fn:length(bigType.smallTypes) != 0 }"> <!--判断集合不为0-->
                    <dt>${bigType.name}</dt>
                    <c:forEach items="${bigType.smallTypes}" var="smallType" >
                        <dd>
                            <a href="search?smallTypeId=${smallType.id}">${smallType.name}</a>
                        </dd>
                    </c:forEach>
                </c:if>
            </c:forEach>
        </dl>
    </div>

    <c:if test="${not empty showHistories}" >
        <div class="last-view">
            <h2>最近浏览</h2>
            <c:forEach items="${showHistories}" var="product" >
                <dl class="clearfix">
                    <dt>
                        <a href="/product?id=${product.id}"><img src="${product.proPic}" class="imgs" style="height: 50px;width: 50px;"></a>
                    </dt>
                    <dd>
                        <a href="/product?id=${product.id}">${product.name}</a>
                    </dd>
                </dl>
            </c:forEach>


        </div>
    </c:if>
</div>
